Searched hist:e99332e7b4cda6e60f5b5916cf9943a79dbef902 (Results 1 – 2 of 2) sorted by relevance
/linux/drivers/firmware/efi/ |
H A D | tpm.c | diff e99332e7b4cda6e60f5b5916cf9943a79dbef902 Sun May 10 02:50:03 CEST 2020 Linus Torvalds <torvalds@linux-foundation.org> gcc-10: mark more functions __init to avoid section mismatch warnings
It seems that for whatever reason, gcc-10 ends up not inlining a couple of functions that used to be inlined before. Even if they only have one single callsite - it looks like gcc may have decided that the code was unlikely, and not worth inlining.
The code generation difference is harmless, but caused a few new section mismatch errors, since the (now no longer inlined) function wasn't in the __init section, but called other init functions:
Section mismatch in reference from the function kexec_free_initrd() to the function .init.text:free_initrd_mem() Section mismatch in reference from the function tpm2_calc_event_log_size() to the function .init.text:early_memremap() Section mismatch in reference from the function tpm2_calc_event_log_size() to the function .init.text:early_memunmap()
So add the appropriate __init annotation to make modpost not complain. In both cases there were trivially just a single callsite from another __init function.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|
/linux/init/ |
H A D | initramfs.c | diff e99332e7b4cda6e60f5b5916cf9943a79dbef902 Sun May 10 02:50:03 CEST 2020 Linus Torvalds <torvalds@linux-foundation.org> gcc-10: mark more functions __init to avoid section mismatch warnings
It seems that for whatever reason, gcc-10 ends up not inlining a couple of functions that used to be inlined before. Even if they only have one single callsite - it looks like gcc may have decided that the code was unlikely, and not worth inlining.
The code generation difference is harmless, but caused a few new section mismatch errors, since the (now no longer inlined) function wasn't in the __init section, but called other init functions:
Section mismatch in reference from the function kexec_free_initrd() to the function .init.text:free_initrd_mem() Section mismatch in reference from the function tpm2_calc_event_log_size() to the function .init.text:early_memremap() Section mismatch in reference from the function tpm2_calc_event_log_size() to the function .init.text:early_memunmap()
So add the appropriate __init annotation to make modpost not complain. In both cases there were trivially just a single callsite from another __init function.
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
|